package com.baymax.custom.service;

import com.baymax.custom.annation.ExecutionTimeStatistics;
import lombok.SneakyThrows;
import org.springframework.stereotype.Service;

/**
 * testService
 *
 * @author hujiabin wrote in 2024/1/20 17:20
 */
@Service
public class TestService {

    @SneakyThrows
    @ExecutionTimeStatistics(stopWatchId = "id1", taskName = "1111111")
    public void step1() {
        Thread.sleep(1000);
    }

    @SneakyThrows
    @ExecutionTimeStatistics(stopWatchId = "id2", taskName = "2222222")
    public void step2() {
        Thread.sleep(2000);
    }

    @SneakyThrows
    @ExecutionTimeStatistics(stopWatchId = "id1", taskName = "3333333")
    public void step3() {
        Thread.sleep(3000);
    }

    @SneakyThrows
    @ExecutionTimeStatistics(stopWatchId = "id2", taskName = "4444444")
    public void step4() {
        Thread.sleep(4000);
    }
}
